<!DOCTYPE html>
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
    <title>博客系统</title>
    <link rel="stylesheet" href="/css/reset.css "/>
    <link rel="stylesheet" href="/css/index.css "/>
    <link rel="stylesheet" href="/css/bootstrap.min.css "/>
    <script src="/js/jquery.min.js "></script>
    <script src="/js/bootstrap.min.js "></script>
    <script SRC="/js/index.js"></script>
</head>
<body>
<div class="header">
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <p class="navbar-text">博客系统</p>
                <a  href="/user/myboke" style="font-size: 20px; color: #00aeff" class="navbar-text">我的博客</a>
            </div>
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="bg-info" ><a href="/">首页</a></li>
                    <li><a href="/boke/getArticles?id=1" >专业课</a></li>
                    <li><a href="/boke/getArticles?id=2" >后端开发</a></li>
                    <li><a href="/boke/getArticles?id=3">算法学习 </a></li>
                    <li><a href="/boke/getArticles?id=4">生活点滴</a></li>
                    <form class="navbar-form navbar-left"  th:action="@{/boke/search}">
                        <div class="form-group">
                            <input type="text" name="title" class="form-control" placeholder="搜索"/>
                        </div>
                        <button type="submit" class="btn btn-default">搜索</button>
                    </form>
                    <a href="/login" sec:authentication="name" class="navbar-text"></a>
                    <a href="/admin/backstage" style="margin-top: 5px;">
                        <input type="submit" class="btn btn-primary" value="后台"/>
                    </a>
                    <form th:action="@{/logout}" method="post" style="float:right;margin-top: 5px;"><input type="submit" class="btn btn-primary"  value="注销" /></form>

                </ul>

            </div>
            <div>
            </div>
        </div>
    </nav>
</div>
<div class="public-container" style="padding-top: 70px">
        <h1 th:text="${article.title}" class="text-center"></h1>
        <p th:text="${#dates.format(article.pubtime,'yyyy/MM/dd')}" class="date text-right"></p>
        <p th:text="${article.content}">
        </p>
        <div class="pl" style="margin-top: 50px">
           <p class="pinglun" style="heght:30px"><span style="font-size: 30px;color: #00b4ef;line-height: 30px">评论区</span><span class="tishi" style="margin-left: 50px;color: red;line-height: 30px">（重要提示：警惕虚假中奖信息）</span></p>
        </div>
    <div class="others" >
        <ul class="list-group">
            <li  class="list-group-item" th:each="review:${reviews}">
                <h4 th:text="${review.user.name}+'：'"></h4>
                <p th:text="${review.content}">
                </p>
                <p th:text="${#dates.format(review.time,'yyyy/MM/dd')}" class="time"></p>
            </li>
        </ul>
    </div>
    <form th:action="@{'/review/saveReview/'+${article.id}}" method="post">
        <textarea type="text" style="width:806px;height:100px;border:1px solid #00b4ef" name="content"> </textarea>
        <input type="submit" value="发表评论" style="color:white;font-size: 24px;float:right;width:100px;background: #00b4ef;height:30px;line-height:30px;margin-bottom: 50px;margin-right: 20px"/>
    </form>
</div>
</body>
</html>